package com.ruding.disruptor.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ruding.disruptor.model.EvidenceRecord;



public interface EvidenceRecordMapper extends AutoCloseable{
    
    /**
     * 创建表结构
     * @return
     */
    public boolean ensureTable();
    
    /**
     * 通过路径查找文件信息
     * @param filePath
     * @return
     */
    public EvidenceRecord getEvidenceRecord(String filePath);
    
    /**
     * 插入录音文件信息
     * @param soundRecord
     * @return
     */
    public int saveEvidenceRecord(EvidenceRecord soundRecord);
    
    /**
     * 获取文件最后修改时间
     * @return
     */
    public Long getLastModified();
    
    public Long getLastModifiedByPath(@Param("path") String path);
    
    /**
     * 更新发送标识
     *
     * @return
     */
    public boolean updateStatus(@Param("filePaths") List<String> filePaths, @Param("status") int status);
    
    /**
     * 更新文件修改时间
     * @param filePath
     * @param lastModified
     * @return
     */
    public boolean updateLastModified(@Param("filePath") String filePath, @Param("lastModified") long lastModified);
    
    /**
     * 获取列表
     * @return
     */
    public List<EvidenceRecord> getEvidenceRecordList(Integer status);

}
